import {
	http
} from '@/utils/http.js'

// 浏览广告弹窗已读
const clearMessage = (id) => {
	return new Promise(async (resolve, reject) => {
		const params = {
			adId: id
		};
		const {
			data: res
		} = await http(true, 'api/notification/advertisement/read', params, 'GET');
		if (res.errno === 0) {
			resolve(res)
		} else {
			reject(false)
		}
	})

}

export {
	clearMessage
}
